// https://iai.sh.cn/problem/717
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ceng = 0;
  int i = 1;
  while (i <= n) {
    ceng++;
    n -= i;
    i++;
  }
  cout << ceng;
  return 0;
}